<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>小米商城</title>
		<link rel="stylesheet" type="text/css" href="/xiaomi/Public/css/bootstrap.min.css" />
		<script src="/xiaomi/Public/js/jquery.min.js"></script>
		<link rel="stylesheet" type="text/css" href="/xiaomi/Public/css/type.css" />
	
	<script>
		$(function(){
			$('#search').submit(function(event){
			 	event.preventDefault();
				window.location.href="/xiaomi/index.php?s=/Home/Index/searchGood/keyword/"+$("#keyword").val(); 
			});
		});
	
	</script>
	</head>

	<body class="index_body">

		<!--*****************************************导航栏*****************************************************-->
		<nav class="navbar navbar-inverse navbar-fixed-top">
			<div class="container-fluid">
				<!--小米商城名称以及隐藏内容按钮-->
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
			        <span class="sr-only"></span>
			        <span class="icon-bar"></span>
			        <span class="icon-bar"></span>
			        <span class="icon-bar"></span>
			    </button>
					<a class="navbar-brand" href="#">小米商城</a>
				</div>
				<!--下拉导航-->
				<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav">
						<li class="active">
							<a href="/xiaomi/index.php?s=/Home/Index/index.html">首页</a>
						</li>
						<li class="dropdown">
							<a href="/xiaomi/index.php?s=/Home/Index/classify.html">分类</a>
						</li>
						<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
								我的 <span class="caret"></span>
							</a>
							<ul class="dropdown-menu">
								<li>
									<a href="/xiaomi/index.php?s=/Home/Cart/index.html">购物车</a>
								</li>
								<li>
									<a href="/xiaomi/index.php?s=/Home/User/order.html">订单</a>
								</li>
								<li>
									<a href="/xiaomi/index.php?s=/Home/User/personalInfo">信息</a>
								</li>
							</ul>
						</li>
					</ul>
					<!--搜索条-->
					<form class="navbar-form navbar-right" id="search">
						<div class="form-group has-feedback">
							<span class="glyphicon glyphicon-search form-control-feedback"></span>
							<input type="search" class="form-control" placeholder="Search for..." autofocus id="keyword">
						</div>
					</form>
					<!--登陆注册连接-->
					<ul class="nav navbar-nav navbar-right">
					    <li>
							<?php if(($_SESSION['userName']) != ""): ?><a>欢迎您，<?php echo (session('userName')); ?></a><?php endif; ?>
						</li>
						<li>
							<a href="/xiaomi/index.php?s=/Home/User/login">登陆</a>
						</li>
						<li>
							<a href="/xiaomi/index.php?s=/Home/User/register">注册</a>
							<!-- "/xiaomi/index.php?s=/Admin/Controller/action" -->
						</li>
					</ul>
				</div>
			</div>
		</nav>
		<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>小米商城</title>
		<link rel="stylesheet" type="text/css" href="/xiaomi/Public/css/bootstrap.min.css" />
		<link rel="stylesheet" type="text/css" href="/xiaomi/Public/css/type.css" />
		<script type="text/javascript" src="/xiaomi/Public/js/jquery.min.js"></script>
		<script type="text/javascript" src="/xiaomi/Public/js/bootstrap.min.js"></script>
		<style>

		</style>
	<script>
	
	function confir(money){
		  if(confirm("确认付款￥"+money+"？")){
        return true;//跳转
		  }else{
			event.preventDefault();
			return false;//不跳转
		}
	} 

	function condel(){
		  if(confirm("确认删除订单？")){
        return true;//跳转
		  }else{
			event.preventDefault();
			return false;//不跳转
		}
	} 
	</script>
	</head>
	<body>
	    <header>
			<div class="col-md-12 col-xs-12">
				<div class="col-md-4 col-xs-3"></div>
				<div class="col-md-4 col-xs-6 text-center">
					<h2>我的订单</h2></div>
				<div class="col-md-4 col-xs-3"></div>
			</div>
			<div class="col-md-12 col-xs-12">
				<div class="col-md-1"></div>
				<div class="col-md-10 col-xs-12">
					<hr style="border: groove #ddd 1px;">
				</div>
				<div class="col-md-1"></div>
			</div>
		</header>
		<section>
		<?php if(($orderitem) != ""): ?><div class="col-md-12 col-xs-12">
				<div class="col-md-2"></div>
				<div class="col-md-8 col-xs-12 ">
					<div class="panel panel-default">
					<?php  for($i=0;$i<sizeof($orderitem);$i++){ echo '<div class="panel-heading">
<span class="index_span2">订单编号：'.$orderitem[$i]['OrderId'].'</span>

<a href="/xiaomi/index.php?s=/Home/User/delOrder/OrderId/'.$orderitem[$i]['OrderId'].'" onclick="condel()"><button class="btn-primary" style="float:right">取消订单</button></a>
<a href="/xiaomi/index.php?s=/Home/User/payorder/OrderId/'.$orderitem[$i]['OrderId'].'" onclick="confir('.$orderitem[$i]['TotalMoney'].')"><button class="btn-primary" style="float:right;margin-right:10px">付款</button></a>


</div>'; for($j=0;$j<sizeof($orders[$i]);$j++){ echo '
<a href="/xiaomi/index.php?s=/Home/Index/goods/gid/'.$orders[$i][$j]['GoodId'].'">
<div class="panel-body">
							<div class="col-md-3 col-xs-3">
								<img src="/xiaomi/Public/uploads/img/'.$orders[$i][$j]['PictureUrl'].'" alt="" class="img-responsive" />
							</div>
							<div class="col-md-6 col-xs-6">
								<div class="order_span2">'.$orders[$i][$j]['GoodName'].'</div>
								<div class="order_span3">'.$orders[$i][$j]['Color'].'</div>
								<div class="order_span3">'.$orders[$i][$j]['Version'].'</div>
							</div>
							<div class="col-md-3 col-xs-3">
								<div class="order_span4"><sup>￥</sup>'.$orders[$i][$j]['Price'].'</div><br />
								<div class="order_span5">x'.$orders[$i][$j]['GoodCount'].'</div>
							</div>
						</div>
						</a>
						<hr />
'; } echo "<br>"; } ?>
						
					</div>
				</div>
			</div><?php endif; ?>
			<?php if(($orderitem) == ""): ?><center><h2>没有待付款的订单，快去<a href="/xiaomi/index.php?s=">采购</a>吧~</h2></center><?php endif; ?>
		</section>
	
	</body>
</html>

	
</body>
</html>